package com.hariro.adapter;

import java.util.List;

import com.hariro.bean.SortTab;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public abstract class SortTabGridViewAdapter extends BaseAdapter {
	private List<SortTab> list;
	private Context context;

	public SortTabGridViewAdapter(Context context, List<SortTab> list) {
		this.context = context;
		this.list = list;
	}

	@Override
	public int getCount() {
		return list.size();
	}

	@Override
	public Object getItem(int position) {
		return list.get(position);
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {

		return initView(position, convertView, parent, list);
	}

	public abstract View initView(int position, View convertView, ViewGroup parent, List<SortTab> list);

}
